package com.itheima.consumer.feign;


import com.itheima.consumer.domain.Goods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


@Component
//加spring容器中
public class GoodsFeignClientFallback implements GoodsFeignClient {

    @Override
    public Goods findGoodsById(int id) {
            Goods goods = new Goods();
            goods.setTitle("降级--");
            return goods;
        }
    }

